package interface_;

public class Chicken extends Animal implements IRunning,IFlying{
    //重写接口中的抽象方法
    @Override
    public void running() {
        System.out.println(super.name + "在疾跑中");
    }
    @Override
    public void flying() {
        System.out.println(super.name + "在飞翔");
    }

    public Chicken(String name) {
        super(name);
    }

    //重写从父类继承的方法
    @Override
    public void bark() {
        System.out.println(super.name + "在报晓");
    }
}
